﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking.Types;
using UnityEngine.UI;

public class GameUIManageCountrol : MonoBehaviour {

	public Text ScoreText;
	public mouseControl mCon;
	private bool isPaused=false;
    public Sprite PlayOn;//游戏开始图片
    public Sprite Pause;//游戏暂停图片
    private Image Ptp;
    // Use this for initialization
    void Start () {
		//Ptp =GetComponent<Image>() ;
  //      Ptp.sprite=PlayOn ;
	}
	
	// Update is called once per frame
	void Update () {
		ScoreText.text=mCon.Count.ToString();
	}
	public void PlayOrPause()
	{

        isPaused = !isPaused;
		Time.timeScale = isPaused?0:1;

	}
    //public void PlOrPaus()
    //{
    //    if (Ptp.sprite == PlayOn)
    //    {
    //        Ptp.sprite = Pause;
    //    }
    //    else
    //    {
    //        Ptp.sprite = PlayOn;
    //    }
    //}
}

